package com.wc.alorithm_luogu.P2669;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2023/4/20 11:30
 * @description https://www.luogu.com.cn/problem/P2669
 * 金币
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int k = sc.nextInt();

        int curCoin = 1;

        int curDay = 1;

        int totalDay = 1;

        int totalCoin = 0;

        // 前正常天数
        while (totalDay <= k) {
            totalCoin += curCoin * curDay;
            curDay++;
            curCoin++;
            totalDay += curDay;
        }
        // 剩余天数
        totalCoin += (k - totalDay + curDay) * curCoin;
        System.out.println(totalCoin);
    }
}
